package ffdata.utils;

import java.util.Set;

public class ProgressBar {
	public static void updateProgress(double progressPercentage) {
		final int width = 100; // progress bar width in chars

		System.out.print("\r[");
		int i = 0;
		for (; i <= (int) (progressPercentage * width); i++) {
			System.out.print(".");
		}
		for (; i < width; i++) {
			System.out.print(" ");
		}
		System.out.print("]");
	}

	public static Double getUnitPercent(Set<String> hrefs) {
		Double value = (double) hrefs.size();
		Double k = 1d / value;
		return k;
	}

}
